<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>登陆-七天合伙人</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="${siteurl}assetsapp/i/favicon.png">
    <link rel="stylesheet" href="${siteurl}assetsapp/css/amazeui.min.css">
    <link rel="stylesheet" href="${siteurl}assetsapp/css/app.css">
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 不提供支持。 请 <a
        href="http://browsehappy.com/" target="_blank">升级浏览器</a>
    以获得更好的体验！</p>
<![endif]-->

<script src="${siteurl}assetsapp/js/jquery.min.js"></script>
<script src="${siteurl}assetsapp/js/amazeui.js"></script>
<script src="${siteurl}assetsapp/js/handlebars.min.js"></script>
<script src="${siteurl}assetsapp/js/amazeui.widgets.helper.js"></script>
<script type="text/javascript">

/*-------------------------------------------*/  
var InterValObj; //timer变量，控制时间  
var count = 60; //间隔函数，1秒执行  
var curCount;//当前剩余秒数  
var code = ""; //验证码  
var codeLength = 6;//验证码长度 
function send(phone){
	
	  $.ajax({  
          type: "POST", //用POST方式传输  
          dataType: "text", //数据格式:JSON  
          url: '${siteurl}/senphonephone.htm', //目标地址  
          data: "phonenum=" + phone,  
          error: function (XMLHttpRequest, textStatus, errorThrown) { },  
          success: function (msg){ }  
      });  
}
function sendMessage() {  
    curCount = count;  
    var phone=$("#phone").val();//手机号码  
    if(phone != ""&&phone.length>1){  
    	send(phone);
        //产生验证码  
        for (var i = 0; i < codeLength; i++) {  
            code += parseInt(Math.random() * 9).toString();  
        }  
        //设置button效果，开始计时  
        $("#btnSendCode").attr("disabled", "true");  
        $("#btnSendCode").val("" + curCount + "秒输入");  
        InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器，1秒执行一次  
    //向后台发送处理数据  
      
    }else{  
        alert("手机号码不能为空！");  
    }  
}  
//timer处理函数  
function SetRemainTime() {  
    if (curCount == 0) {                  
        window.clearInterval(InterValObj);//停止计时器  
        $("#btnSendCode").removeAttr("disabled");//启用按钮  
        $("#btnSendCode").val("重新获取");  
        code = ""; //清除验证码。如果不清除，过时间后，输入收到的验证码依然有效      
    }  
    else {  
        curCount--;  
        $("#btnSendCode").val("" + curCount + "秒输入");  
    }  
} 
</script>
<body>
<header class="am-topbar am-topbar-brand am-topbar-fixed-top">
    <div class="am-container">
        <div class="am-g">
            <div class="am-u-sm-3"><a href="${siteurl}/user_reg.htm" class="am-text-left">返回</a> </div>
            <div class="am-u-sm-3"></div>
            <div class="am-u-sm-3"></div>
            <div class="am-u-sm-3"></div>
        </div>
    </div>
</header>

<p class="am-text-primary am-text-lg am-text-center">会员注册</p>




<div class="am-g">
    <div class="am-u-lg-6 am-u-md-8 am-u-sm-centered">
        <form class="am-form" action="${siteurl}/user_reg_work.htm" method="post">
            <input id="phone" type="hidden" name="phonenum" value="${phonenum!''}"/>
            <fieldset class="am-form-set">
                <input required class="am-input-lg" name="code" type="text" placeholder="输入验证码">
                <input required name="password" class="am-input-lg" type="password" placeholder="设置初始密码">
                <br/>
                 <input style="width:90px;" type="button" onclick="sendMessage();" id="btnSendCode" class="am-btn am-btn-danger" value="重新获取"/>
                <label for="remember-me">


                    <input id="remember-me" type="checkbox" required />
                    <small><a href="http://www.qdays.cn/user-law.html"> 我已阅读并同意相关协议</a></small>
                </label>
                <br/>
                 ${msg!""}
            </fieldset>
            <button type="submit" class="am-btn am-btn-primary am-btn-block">完成</button>
        </form>
    </div>
</div>


<script src="${siteurl}assetsapp/js/app.js"></script>
</body>
</html>
